#include<iostream>
using namespace std;
int main()
{int a[100][100],b[1000] ,n;
 cin>>n;
 for(int d=1;d<=n;d++)
       b[d]=0;
 for(int i=1;i<=n;i++)
   for(int j=1;j<=n;j++)
        cin>>a[i][j];
 for(int k=1;k<=n-1;k++)
   for(int l=k+1;l<=n;l++)
       {if(a[k][l]>a[l][k])   b[k]++;
        else   b[l]++;
        }
 int s=0,s1;
 for(int m=1;m<=n;m++)
   {if(b[m]>s)    { s=b[m];s1=m;}
   }
 cout<<s1<<endl;
 system("pause");
 return 0;
}
